/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vn.ac.c0910g.assignment.Entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author BachLe
 */
@Entity
@Table(name = "Feedback")
@NamedQueries({
    @NamedQuery(name = "Feedback.findAll", query = "SELECT f FROM Feedback f"),
    @NamedQuery(name = "Feedback.findByFeedbackID", query = "SELECT f FROM Feedback f WHERE f.feedbackID = :feedbackID"),
    @NamedQuery(name = "Feedback.findByFullName", query = "SELECT f FROM Feedback f WHERE f.fullName = :fullName"),
    @NamedQuery(name = "Feedback.findByEmail", query = "SELECT f FROM Feedback f WHERE f.email = :email"),
    @NamedQuery(name = "Feedback.findByTitle", query = "SELECT f FROM Feedback f WHERE f.title = :title"),
    @NamedQuery(name = "Feedback.findByBody", query = "SELECT f FROM Feedback f WHERE f.body = :body"),
    @NamedQuery(name = "Feedback.findByCreateDate", query = "SELECT f FROM Feedback f WHERE f.createDate = :createDate"),
    @NamedQuery(name = "Feedback.findByReadFeedback", query = "SELECT f FROM Feedback f WHERE f.readFeedback = :readFeedback"),
    @NamedQuery(name = "Feedback.findByVisiable", query = "SELECT f FROM Feedback f WHERE f.visiable = :visiable")})
public class Feedback implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "FeedbackID")
    private Integer feedbackID;
    @Basic(optional = false)
    @Column(name = "FullName")
    private String fullName;
    @Basic(optional = false)
    @Column(name = "Email")
    private String email;
    @Basic(optional = false)
    @Column(name = "Title")
    private String title;
    @Basic(optional = false)
    @Column(name = "Body")
    private String body;
    @Basic(optional = false)
    @Column(name = "CreateDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDate;
    @Column(name = "ReadFeedback")
    private Integer readFeedback;
    @Column(name = "Visiable")
    private Integer visiable;

    public Feedback() {
    }

    public Feedback(Integer feedbackID) {
        this.feedbackID = feedbackID;
    }

    public Feedback(Integer feedbackID, String fullName, String email, String title, String body, Date createDate) {
        this.feedbackID = feedbackID;
        this.fullName = fullName;
        this.email = email;
        this.title = title;
        this.body = body;
        this.createDate = createDate;
    }

    public Integer getFeedbackID() {
        return feedbackID;
    }

    public void setFeedbackID(Integer feedbackID) {
        this.feedbackID = feedbackID;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getReadFeedback() {
        return readFeedback;
    }

    public void setReadFeedback(Integer readFeedback) {
        this.readFeedback = readFeedback;
    }

    public Integer getVisiable() {
        return visiable;
    }

    public void setVisiable(Integer visiable) {
        this.visiable = visiable;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (feedbackID != null ? feedbackID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Feedback)) {
            return false;
        }
        Feedback other = (Feedback) object;
        if ((this.feedbackID == null && other.feedbackID != null) || (this.feedbackID != null && !this.feedbackID.equals(other.feedbackID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "vn.ac.c0910g.assignment.DAO.Feedback[feedbackID=" + feedbackID + "]";
    }

}
